package com.turtle3d.turtle;

import javax.vecmath.Matrix4f;

/**
 * 3D Turtle interface
 * 
 * @author Marek Paterczyk <marek.paterczyk@gmail.com>
 * 
 */
public interface Turtle3D {

	/**
	 * Move forward
	 * 
	 * @param distance
	 *            Distance to move, negative value means backwards
	 */
	public abstract void forward(float distance);

	/**
	 * Turn left/right
	 * 
	 * @param angle
	 *            Angle in degrees, negative means left
	 */
	public abstract void turn(float angle);

	/**
	 * Roll left/right
	 * 
	 * @param angle
	 *            Angle in degrees, negative means left
	 */
	public abstract void roll(float angle);

	/**
	 * Pitch down/up
	 * 
	 * @param angle
	 *            Angle in degrees, negative means down
	 */
	public abstract void pitch(float angle);

	/**
	 * Push actual transformation to the stack
	 */
	public abstract void push();

	/**
	 * Pop transformation from the stack and make it actual one
	 */
	public abstract void pop();

	/**
	 * Get turtle's actual tranformation matrix as a copy.
	 * 
	 * @return 4x4 transform matrix
	 */
	public abstract Matrix4f getTransformMatrix();

	/**
	 * Depth reached by turtle. Each forward command rises depth by one. Depth
	 * is pushed and popped too.
	 * 
	 * @return depth
	 */
	public abstract int getDepth();

	/**
	 * Maximal depth reached by turtle.
	 * 
	 * @return Maximal depth reached by turtle
	 */
	public abstract int getMaximalDepth();

	/**
	 * Tranform turtle's position
	 * 
	 * @param matrix
	 *            4x4 transform matrix
	 */
	public abstract void transform(Matrix4f matrix);

	/**
	 * Scale turtle
	 * 
	 * @param x
	 *            scale axis x
	 * @param y
	 *            scale axis y
	 * @param z
	 *            scale axis z
	 */
	public abstract void scale(float x, float y, float z);

}